<template>
  <div class="container" style="display: flex;
    flex-direction: column;">
    <!-- 主内容区域 -->
    <main class="main-content">
      <div class="main-content-head">
        <div>
          <div
              style="font-size: 100px;font-weight: 600; text-shadow: 5px 5px 14px rgba(0, 0, 0, 0.5); color: #5473cc;">
            非遗智创社区
          </div>
          <br>
          <div style="font-size: 40px; text-shadow: 5px 5px 14px rgba(0, 0, 0, 0.5); color: #333;">专属于非遗的AI</div>
          <br>
          <div style="font-size: 30px;text-shadow: 5px 5px 14px rgba(0, 0, 0, 0.5); color: #666;">整合通义大模型</div>
          <br>
          <div style="font-size: 30px;
            background-color: #5473cc;
            width: 150px;height: 50px;
            text-align: center;
            line-height: 50px;
            color: white;
            border-radius: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: background-color 0.3s ease;"
               @mouseover="hoverButton(true)"
               @mouseleave="hoverButton(false)"
          >
            <router-link to="/ChatView" style="text-decoration: none; color: white;">了解详细</router-link>
          </div>
        </div>
        <img alt="" src="@/assets/image/CultureCommunityLogo.png" style="width: 60%;height:80%; border-radius: 20px;">
      </div>
      <div class="main-content-card">
        <div class="main-content-card-body">
          <div>
            <img alt="" src="@/assets/image/向导.png" style="width: 50px; height: 50px; border-radius: 10px;"/>
            <span><router-link to="/AiTool"
                               style="text-decoration: none; color: #5473cc; font-size: 20px;"> 中国非物质文化遗产向导</router-link></span>
          </div>
          <div>
            <img alt="" src="@/assets/image/生成图片.png" style="width: 50px; height: 50px; border-radius: 10px;"/>
            <span><router-link to="/AiTool"
                               style="text-decoration: none; color: #5473cc; font-size: 20px;"> 非遗图片生成</router-link></span>
          </div>
        </div>
      </div>
      <div class="main-content-show">
        <router-view></router-view>
      </div>
    </main>
  </div>
</template>

<script>
export default {
  methods: {
    hoverButton(isHover) {
      const button = document.querySelector('.main-content-head div div');
      if (isHover) {
        button.style.backgroundColor = '#3a5f9a';
      } else {
        button.style.backgroundColor = '#5473cc';
      }
    }
  }
}
</script>

<style lang="scss" scoped>
@import "@/assets/css/CultureCommunityView.css";
</style>
